package com.whut.mapper;

import com.whut.model.Groupmember;

import java.util.List;

public interface GroupmemberMapper {
    int deleteByPrimaryKey(Integer mkey);

    int insert(Groupmember record);

    int insertSelective(Groupmember record);

    Groupmember selectByPrimaryKey(Integer mkey);

    int updateByPrimaryKeySelective(Groupmember record);

    int updateByPrimaryKey(Groupmember record);

    /*my methods*/

    int deleteGroupMember(int groupId,int userId);//删除一条

    int deleteGroupMemberByGroupId(int groupId);//删除一个组的所有人

    int insertMembers(List<Groupmember> list);

    List<Groupmember> getIsHeaderNumber(int userId, int groupId);

    List<Groupmember> getIsGroupLeader(int userId);//简单地判断是不是组长
    int setHeader(Integer userId, Integer groupId);
    int cancelHeader(Integer userId, Integer groupId);
    int countHeader(int groupId);

}